package org.example.test1.newcontroller;

import org.example.test1.newservice.InsertService;
import org.example.test1.pojo.Result;
import org.example.test1.pojo.dto.InsertDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin(origins = "*")
@RestController
@RequestMapping("/brand")
public class InsertController {
    @Autowired
    private InsertService insertService;

@PostMapping
    public Result insert(@RequestBody InsertDto insertDto){
        insertService.insert(insertDto);
        return Result.success();
    }
}
